package com.whtq.front.common.model.response;

import com.github.pagehelper.PageInfo;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * Created by
 *
 * @author wmi
 * @date 2021/9/15 - 16:17.
 * @description
 */
@Data
//@NoArgsConstructor
public class PageRes<T> {

    private Long total = 0L;
    private List<T> list;

    public PageRes(List<T> list) {
        PageInfo pageInfo = new PageInfo<>(list);
        this.total = pageInfo.getTotal();
        this.list = list;
    }
}
